package com.huitone.gddw.controller.worktable.paramconfigmanage;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.huitone.gddw.dao.entity.LinkSendPro;
import com.huitone.gddw.service.ILinkSendProService;

/**
 * 通道可发送省份 控制器
 * @author wuluodan
 *
 */
@Controller
@RequestMapping(value="linkSendPro")
public class LinkSendProController {

	private final static Logger LOGGER = Logger.getLogger(LinkSendProController.class);
	
	@Autowired
	private ILinkSendProService linkSendProService;
	
	/**
	 * 根据通道ID获取可发送省份
	 * @return List
	 */
	@ResponseBody
	@RequestMapping(value="getByGateLinkId")
	public List<LinkSendPro> getByGateLinkId(String gateLinkId) {
		try {
			return linkSendProService.getByGateLinkId(gateLinkId);
		} catch (Exception e) {
			LOGGER.error("根据通道ID获取可发送省份信息出现异常：" + e.getMessage(), e);
			return null;
		}
	}
	
}
